sfm_driver_dir ?= ..
sensirion_common_dir ?= ${sfm_driver_dir}/embedded-common
sfm_common_dir ?= ${sfm_driver_dir}/sfm-common
sfm3003_dir ?= ${sfm_driver_dir}/sfm3003
CONFIG_I2C_TYPE ?= hw_i2c

sw_i2c_impl_src ?= ${sensirion_common_dir}/sw_i2c/sensirion_sw_i2c_implementation.c
hw_i2c_impl_src ?= ${sensirion_common_dir}/hw_i2c/sensirion_hw_i2c_implementation.c

CFLAGS ?= -Os -Wall -fstrict-aliasing -Wstrict-aliasing=1 -Wsign-conversion -fPIC
CFLAGS += -I${sensirion_common_dir} -I${sfm_common_dir} -I${sfm3003_dir} \
          -I${sensirion_common_dir}/${CONFIG_I2C_TYPE}

sensirion_common_sources = ${sensirion_common_dir}/sensirion_arch_config.h \
                           ${sensirion_common_dir}/sensirion_i2c.h \
                           ${sensirion_common_dir}/sensirion_common.h \
                           ${sensirion_common_dir}/sensirion_common.c

sfm_common_sources = ${sfm_common_dir}/sfm_git_version.h \
                     ${sfm_common_dir}/sfm_git_version.c \
                     ${sfm_common_dir}/sfm_common.h \
                     ${sfm_common_dir}/sfm_common.c

sfm3003_sources = ${sensirion_common_sources} ${sfm_common_sources} \
                  ${sfm3003_dir}/sfm3003.h ${sfm3003_dir}/sfm3003.c

hw_i2c_sources = ${hw_i2c_impl_src}
sw_i2c_sources = ${sensirion_common_dir}/sw_i2c/sensirion_sw_i2c_gpio.h \
                 ${sensirion_common_dir}/sw_i2c/sensirion_sw_i2c.c \
                 ${sw_i2c_impl_src}
